sample_list = [1,2,3,1,2,4,10]
mean_val = sum(sample_list)/len(sample_list)
x = [i-mean_val for i in sample_list]
print(x)

#方法2
import numpy as np
mean_v = np.mean(sample_list)
y = np.array(sample_list)- mean_v
print(y)